<template>
  <div class="hello-world">
    <h2 class="section-title">{{ msg }}</h2>
    <div class="content-section">
      <div class="guide-section">
        <h3>开发指南</h3>
        <p>如需配置和自定义此项目，请查看</p>
        <a href="https://cli.vuejs.org" target="_blank" rel="noopener" class="external-link">
          vue-cli 官方文档
        </a>
      </div>
      
      <div class="plugins-section">
        <h3>已安装的CLI插件</h3>
        <ul class="plugins-list">
          <li>
            <a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-router" target="_blank" rel="noopener">
              router
            </a>
          </li>
          <li>
            <a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-vuex" target="_blank" rel="noopener">
              vuex
            </a>
          </li>
        </ul>
      </div>
      
      <div class="links-section">
        <div class="links-column">
          <h3>核心链接</h3>
          <ul class="links-list">
            <li>
              <a href="https://vuejs.org" target="_blank" rel="noopener">官方文档</a>
            </li>
            <li>
              <a href="https://forum.vuejs.org" target="_blank" rel="noopener">官方论坛</a>
            </li>
            <li>
              <a href="https://chat.vuejs.org" target="_blank" rel="noopener">社区聊天</a>
            </li>
          </ul>
        </div>
        
        <div class="links-column">
          <h3>生态系统</h3>
          <ul class="links-list">
            <li>
              <a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a>
            </li>
            <li>
              <a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a>
            </li>
            <li>
              <a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a>
            </li>
          </ul>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'HelloWorld',
  props: {
    msg: String
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="scss">
.hello-world {
  padding: 40px 20px;
  background-color: #f8f9fa;
  border-radius: 8px;
  margin: 40px 0;
}

.section-title {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 40px;
  color: #2c3e50;
}

.content-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}

.guide-section {
  text-align: center;
  
  h3 {
    margin-bottom: 15px;
    color: #2c3e50;
  }
  
  p {
    margin-bottom: 20px;
    color: #7f8c8d;
  }
}

.plugins-section {
  h3 {
    margin-bottom: 20px;
    color: #2c3e50;
  }
}

.plugins-list {
  list-style-type: none;
  padding: 0;
  
  li {
    margin-bottom: 10px;
  }
}

.links-section {
  display: flex;
  gap: 40px;
  
  @media (max-width: 768px) {
    flex-direction: column;
    gap: 30px;
  }
}

.links-column {
  flex: 1;
  
  h3 {
    margin-bottom: 20px;
    color: #2c3e50;
  }
}

.links-list {
  list-style-type: none;
  padding: 0;
  
  li {
    margin-bottom: 10px;
  }
}

.external-link, .links-list a {
  color: #42b983;
  text-decoration: none;
  transition: color 0.3s ease;
  
  &:hover {
    color: #359c6d;
    text-decoration: underline;
  }
}
</style>